import { TypedUseSelectorHook, useSelector } from 'react-redux';
import { legacy_createStore as createStore } from 'redux';
import rootReducer from './reducer/index';

const store = createStore(rootReducer);
export default store;

// 💥 去redux官网cv useAppSelector
export type RootState = ReturnType<typeof store.getState>;
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
